import os


class Configuration(object):
    DEBUG = False
    APP_PATH = base_path = os.path.abspath('./')
    SQLALCHEMY_DATABASE_URI = r'sqlite:///' + os.path.join(APP_PATH,'data','fiction_spider.db')
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    DataSQLSource = os.path.join(APP_PATH,'data','fiction_spider.sql')


class DevelopmentConfiguration(Configuration):
    '开发配置'
    DEBUG = True


class ProductionConfiguration(Configuration):
    DEBUG = False

Config = Configuration
